package com.zmm.zebulon.starter.biz.log.config;

import com.zmm.zebulon.module.system.api.logger.OperateLogApi;
import com.zmm.zebulon.starter.biz.log.core.aop.OperateLogAspect;
import com.zmm.zebulon.starter.biz.log.core.service.OperateLogFrameworkService;
import com.zmm.zebulon.starter.biz.log.core.service.OperateLogFrameworkServiceImpl;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * description: 操作日志记录自动配置类
 *
 * @author zebulon
 * package com.zmm.zebulon.starter.biz.log.config
 * name: ZebulonOperateLogAutoConfiguration
 * date 2024/1/9 23:29
 */
@AutoConfiguration
public class ZebulonOperateLogAutoConfiguration {

    @Bean
    public OperateLogAspect operateLogAspect() {
        return new OperateLogAspect();
    }

    @Bean
    public OperateLogFrameworkService operateLogFrameworkService(OperateLogApi operateLogApi) {
        return new OperateLogFrameworkServiceImpl(operateLogApi);
    }

}
